<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<table border="2">
    <tr>
        <th>id</th>
        <th>姓名</th>
        <th>课程</th>
        <th>成绩</th>
    </tr>

<?php
$server="localhost";
$name="root";
$pwd="123456";
$db="dawut";
$con=mysqli_connect($server,$name,$pwd,$db);D:\phpstudy_pro\WWW\man2.php

if($con){
    $sql="select * from kuyax";
    $run=mysqli_query($con,$sql);
    if(mysqli_num_rows($run)>1){
        while ($kur = mysqli_fetch_assoc($run)){
              echo "<tr>";
        echo "<td>". $kur['id'] ."</td>";
        echo "<td>". $kur['name'] ."</td>";
        echo "<td>". $kur['daris'] ."</td>";
        echo "<td>". $kur['natija'] ."</td>";
        echo "</tr>";
        }
    }
}else{
    echo "未连接数据库，错误内容:" .mysqli_connect_error();
}
?>








</table>
</body>
</html>